package com.itheima.demo01;

public class Test {
    public static void main(String[] args) {

        // 创建人对象
        Person p1 = new Person("老王", 30);
        // 创建狗对象
        Dog d = new Dog(2, "黑");

        p1.keepPet(d, "骨头");


        Person p2 = new Person("老李", 29);
        Cat c = new Cat(3, "白");

        p2.keepPet(c, "鱼");

    }
}
